package com.cd2cd.code_template.code_template.domain.gen;

import java.io.Serializable;

public class SuperSysRelationUser implements Serializable {
    private Integer id;

    /**
     * 关联id
     */
    private Integer relationId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 类型 role group
     */
    private String type;

    /**
     * 所属登录类型 SysAdmin Backend Customer Api App
     */
    private String loginType;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 关联id
     */
    public Integer getRelationId() {
        return relationId;
    }

    /**
     * 关联id
     */
    public void setRelationId(Integer relationId) {
        this.relationId = relationId;
    }

    /**
     * 用户id
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 用户id
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 类型 role group
     */
    public String getType() {
        return type;
    }

    /**
     * 类型 role group
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * 所属登录类型 SysAdmin Backend Customer Api App
     */
    public String getLoginType() {
        return loginType;
    }

    /**
     * 所属登录类型 SysAdmin Backend Customer Api App
     */
    public void setLoginType(String loginType) {
        this.loginType = loginType;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", relationId=").append(relationId);
        sb.append(", userId=").append(userId);
        sb.append(", type=").append(type);
        sb.append(", loginType=").append(loginType);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SuperSysRelationUser other = (SuperSysRelationUser) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRelationId() == null ? other.getRelationId() == null : this.getRelationId().equals(other.getRelationId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getLoginType() == null ? other.getLoginType() == null : this.getLoginType().equals(other.getLoginType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRelationId() == null) ? 0 : getRelationId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getLoginType() == null) ? 0 : getLoginType().hashCode());
        return result;
    }
}